import type { AppRouteModule } from '/@/router/types';
import { RoleEnum } from '/@/enums/roleEnum';
import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

const Log: AppRouteModule = {
  path: '/log',
  name: 'Log',
  component: LAYOUT,
  redirect: '/log/logOperation',
  meta: {
    orderNo: 999,
    icon: 'ant-design:reddit-circle-filled',
    title: t('routes.demo.log.logTitle'),
    roles: [RoleEnum.ADMIN],
  },
  children: [
    {
      path: 'operation',
      name: 'Operation',
      meta: {
        title: t('routes.demo.log.logOperation'),
        roles: [RoleEnum.ADMIN],
      },
      component: () => import('/@/views/locality/log/operation.vue'),
    },
    {
      path: 'logError',
      name: 'LogError',
      meta: {
        title: t('routes.demo.log.logError'),
        roles: [RoleEnum.ADMIN],
      },
      component: () => import('/@/views/locality/log/error.vue'),
    },
  ],
};

export default Log;
